You are here: Statements and Functions > DownQty()
Syntax samples
DOWNQTY(<location> or <resource>>)
IF DOWNQTY(Loc1) > 3 THEN ROUTE 2
DISPLAY "Total Res1 Down Now:" $ DOWNQTY(Res1)
Returns the number of location or resource units down at the time of the call. Use this function to make decisions based on how many resource or location units are down. For example, if too many units are down, a foreman could preempt several units back into service.
Any logic and all fields except those fields evaluated at translation only. For a list of the fields evaluated only at translation, see the Appendix A.
Components
<location>
The name of the location to examine. LOC() can be substituted for the name of a location.
<resource>
The name of the resource to examine. RES() can be substituted for the name of a resource.
Example
Two resources, Welders, weld brackets onto steel frames at a location, Man_Weld, in 6.5 minutes. An automatic welding machine, Auto_Weld, can perform the same task, but it takes 9.3 minutes. However, if only one Welder is available and the other Welder is down (e.g., on break), it takes one Welder 13.0 minutes to weld the brackets to the frames. Therefore, if one Welder is down, the frames should route to the automatic welding machine, Auto_Weld.
Process Table
Entity |
Location |
Operation (min) |
---|---|---|
Frame |
Buffer |
IF DOWNQTY(Welder)>0 THEN ROUTE 1 ELSE ROUTE 2 |
Frame |
Auto_Weld |
... |
Frame |
Man_Weld |
... |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1 |
Frame |
Auto_Weld |
FIRST 1 |
MOVE FOR 1 |
2 |
Frame |
Man_Weld |
FIRST 1 |
MOVE FOR 1 |
... |
... |
... |
... |
... |
... |
... |
... |
... |
... |
FREECAP, FREEUNITS(), and UNITS().